<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//后台登录接口//middleware('cors')->
Route::namespace('Backend')->group(function () {   
    //上传
    Route::post('upload', [\App\Backend\Controllers\FileUploadController::class, 'upload']);
    Route::post('upload_image', [\App\Backend\Controllers\FileUploadController::class, 'upload_image']);

    Route::post('checkimage', [\App\Backend\Controllers\ImageCheckController::class, 'checkImage']);
    #分片上传
    Route::post('chuckimage', [\App\Backend\Controllers\FileUploadController::class, 'chuckimage']);
    ############################豆瓣###########################################################
    Route::post('doubanList', [\App\Backend\Controllers\DoubanpostController::class, 'getList']);
    Route::post('doubandetail', [\App\Backend\Controllers\DoubanpostController::class, 'detail']);
    Route::post('doubanedit', [\App\Backend\Controllers\DoubanpostController::class, 'edit']);
    Route::post('doubandel', [\App\Backend\Controllers\DoubanpostController::class, 'del']);

    ############################豆瓣#####################################################

    ###########################帖子举报###################################################
    Route::post('userreportgetList', [\App\Backend\Controllers\UserreportController::class, 'getList']);

    ###########################爆料###################################################
    Route::post('Baoliaoadd', [\App\Backend\Controllers\BaoliaopostController::class, 'add']);
    Route::post('Baoliaodel', [\App\Backend\Controllers\BaoliaopostController::class, 'del']);
    Route::post('Baoliaoedit', [\App\Backend\Controllers\BaoliaopostController::class, 'edit']);

    Route::post('Baoliaolist', [\App\Backend\Controllers\BaoliaopostController::class, 'getList']);


    ###########################爆料###################################################




    #############################商品分类########################################
    Route::post('Categorymappinglist', [\App\Backend\Controllers\CategorymappingController::class, 'getList']);

    Route::post('Categorymappingedit', [\App\Backend\Controllers\CategorymappingController::class, 'edit']);
    Route::post('Categorymappingdetail', [\App\Backend\Controllers\CategorymappingController::class, 'detail']);

    Route::post('Categorymappingeadd', [\App\Backend\Controllers\CategorymappingController::class, 'add']);
    Route::post('Categorymappingedel', [\App\Backend\Controllers\CategorymappingController::class, 'del']);

    #更新缓存分类名称
    Route::post('updatemappingcache', [\App\Backend\Controllers\CategorymappingController::class, 'updateMappingCache']);

    #############################品牌分类########################################

    #############################品牌分类########################################
    Route::post('Brandmappinglist', [\App\Backend\Controllers\BrandmappingController::class, 'getList']);

    Route::post('Brandmappingedit', [\App\Backend\Controllers\BrandmappingController::class, 'edit']);
    Route::post('Brandmappingdetail', [\App\Backend\Controllers\BrandmappingController::class, 'detail']);

    Route::post('Brandmappingadd', [\App\Backend\Controllers\BrandmappingController::class, 'add']);
    Route::post('Brandmappingdel', [\App\Backend\Controllers\BrandmappingController::class, 'del']);
    #更新缓存品牌名称
    Route::post('updatemappingcache2', [\App\Backend\Controllers\BrandmappingController::class, 'updateMappingCache']);

    #############################品牌分类########################################


    ############################评论##############################################
    Route::post('Commentlist', [\App\Backend\Controllers\CommentController::class, 'getList']);
/*
    Route::post('Brandmappingedit', [\App\Backend\Controllers\CommentController::class, 'edit']);

    Route::post('Brandmappingadd', [\App\Backend\Controllers\CommentController::class, 'add']);
    Route::post('Brandmappingdel', [\App\Backend\Controllers\CommentController::class, 'del']);*/
    ############################评论##############################################


    ##########################豆瓣推送##########################################
    Route::post('doubanpushnew', [\App\Backend\Controllers\DoubanPushController::class, 'add']);
    ##########################豆瓣推送##########################################

});


Route::group(['middleware' => ['auth.jwt.backend']], function () 
{
   
    
});
